<?php
namespace App\Models\Traits;
use App\Models\IntegralRule;
trait IntegralRuleShowHelper
{
    //获取注册获得的积分数
    public static function getRegisterIntegral()
    {
        return IntegralRule::where("key", IntegralRule::REGISTER)->value('value');
    }

    //获取签到获得的积分数
    public static function getSignInIntegral()
    {
        return IntegralRule::where("key", IntegralRule::SIGN_IN)->value('value');
    }

    //获取卡券的过期时间
    public static function getPassDay()
    {
        return IntegralRule::where("key", IntegralRule::PASS_DAY)->value('value');
    }
    //获取积分兑换比例
    public static function getRatio()
    {
        return IntegralRule::where("key",IntegralRule::RATIO)->value("value");
    }
}
